/**
 * @version: V1.0
 * @Title: Test04_printAllFolds.java
 * @Description:
 * @author wangshipeng
 * @date 2022-01-24 23:42
 * @Copyright: 2022-01-24
 */

package com.peng.tree.test_code;

/**
 * @author wangshipeng
 * @ClassName: Test04_printAllFolds
 * @Description: 折纸问题
 * @date 2022-01-24 23:42
 */
public class Test04_PrintAllFolds {

    /**
     * @param N 折几次
     */
    public static void printAllFolds(int N) {
        printProcess(1, N, true);
    }

    /**
     * @param i      当前是第几次
     * @param n      折几次
     * @param isDown true :凹  false：凸
     */
    private static void printProcess(int i, int n, boolean isDown) {
        if (i > n) {
            return;
        }
        printProcess(i + 1, n, true);
        System.out.println(isDown ? "凹" : "凸");
        printProcess(i + 1, n, false);

    }

    public static void main(String[] args) {
        printAllFolds(3);
    }
}
